<template>
  <el-table
    :data="tabBody.tableList.list"
    border
    :style="styles || {width: '100%'}">
    <el-table-column
    v-for="(item, index) in tabHeader"
    v-bind:key="index"
    :label="item"
    align="center"
     >
    <template slot-scope="scope">
           <span>{{scope.row[index]}}</span>
          </template>
    </el-table-column>
  </el-table>
</template>
<script>
import { mapGetters } from 'vuex'
export default {
  props: {
    tabHeader: {
      type: Object,
      default: function() {
        return {}
      }
    },
    styles: {
      type: Array,
      default: undefined
    }
  },
  computed: {
    ...mapGetters([
      'tabBody'
    ])
  },
  data () {
    return {
      data: {
        list: []
      }
    }
  }
}
</script>
